//
//  LoginViewController.m
//  LanQiuQuan
//
//  Created by TonyGenius on 16/3/18.
//  Copyright © 2016年 Rip. All rights reserved.
//

#import "LoginViewController.h"
#import "LoginHelper.h"
#import "XMTabBarController.h"
#import "Marco.h"

@interface LoginViewController ()

@property (weak, nonatomic) IBOutlet UIImageView *loginImageView;

@property (weak, nonatomic) IBOutlet UITextField *phoneTextField;

@property (weak, nonatomic) IBOutlet UITextField *passWordTextField;



@end

@implementation LoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self initNavBar];
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
    NSLog(@"%@___%@",_cityCode,_provice);
    _phoneTextField.textColor = [UIColor whiteColor];
    _passWordTextField.textColor = [UIColor whiteColor];
    //pageSize
//    currentPage
//    NSString *url = [NSString stringWithFormat:@"%@pageSize=10&currentPage=0",kURLFORPLAYGROUNDLIST];
//    NSString *url1 = [url stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
//    [NetWorkEngin getRequestWithParametes:url1 andBody:nil andFinishBlock:^(NSData *respondData, NSError *error) {
////        NSLog(@"%@");
//    }];
//    NSString *userID = [NSString stringWithFormat:@"2"];
//    NSString *URL = [NSString stringWithFormat:@"%@%@",KURLFORMYTEAM,userID];
//    [NetWorkEngin getRequestWithParametes:URL andBody:nil andFinishBlock:^(NSDictionary *respondData, NSError *error) {
//        NSLog(@"%@",respondData);
//    }];
    
}

- (void)viewWillAppear:(BOOL)animated
{
//    self.navigationController.navigationBarHidden = YES;
    [self.navigationController setNavigationBarHidden:YES animated:YES];
}

- (void)initNavBar
{
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"barBG"] forBarMetrics:UIBarMetricsDefault];
//    [self.navigationController.navigationBar setBarTintColor:[UIColor lightGrayColor]];
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
    
}

- (IBAction)goToHomePage:(id)sender {
    
   XMTabBarController *tab = [LoginHelper createTab:_cityCode andProvice:_provice andLocation:_location];
    [self presentViewController:tab animated:YES completion:nil];
    
}

- (IBAction)changeBtnStyle:(UIButton *)sender {
    sender.highlighted = YES;

}
- (IBAction)canle:(UIButton *)sender {
    sender.highlighted = NO;
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [self.view endEditing:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
